 local function BLGUI_665f77d44103340a4afde7c086158e86(BLGUI_72fbd723555d5e02080d679e855d2211) BLGUI_72fbd723555d5e02080d679e855d2211.SetAlpha = function(self, ...) return self.frame:SetAlpha(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetAlpha = function(self, ...) return self.frame:GetAlpha(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.ClearAllPoints = function(self, ...) return self.frame:ClearAllPoints(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetBottom = function(self, ...) return self.frame:GetBottom(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetCenter = function(self, ...) return self.frame:GetCenter(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetHeight = function(self, ...) return self.frame:GetHeight(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetLeft = function(self, ...) return self.frame:GetLeft(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetNumPoints = function(self, ...) return self.frame:GetNumPoints(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetParent = function(self, ...) return self.frame:GetParent(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetPoint = function(self, ...) return self.frame:GetPoint(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetRight = function(self, ...) return self.frame:GetRight(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetTop = function(self, ...) return self.frame:GetTop(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetWidth = function(self, ...) return self.frame:GetWidth(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.Hide = function(self, ...) return self.frame:Hide(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.IsShown = function(self, ...) return self.frame:IsShown(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.IsVisible = function(self, ...) return self.frame:IsVisible(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetAllPoints = function(self, ...) return self.frame:SetAllPoints(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetHeight = function(self, ...) return self.frame:SetHeight(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetParent = function(self, ...) return self.frame:SetParent(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetPoint = function(self, ...) return self.frame:SetPoint(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetWidth = function(self, ...) return self.frame:SetWidth(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.Show = function(self, ...) return self.frame:Show(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetScale = function(self, ...) return self.frame:SetScale(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetScale = function(self, ...) return self.frame:GetScale(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.GetEffectiveScale = function(self, ...) return self.frame:GetEffectiveScale(...); end; BLGUI_72fbd723555d5e02080d679e855d2211.SetToplevel = function(self, ...) return self.frame:SetToplevel(...); end; end BFProgressBar = {}; function BFProgressBar:constructor(BLGUI_1346009d8936868590c1d007e3efcfae, BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7, BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1) local frame = CreateFrame("StatusBar", nil, BLGUI_1346009d8936868590c1d007e3efcfae); frame:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar", "BORDER"); if (not BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027 or not BLGUI_0f402d7ba502a47a51c410aee99b1ff1 or not BLGUI_a0a053cacf1c8c43346fdc3adb684cb7) then BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027 = 1.0; BLGUI_0f402d7ba502a47a51c410aee99b1ff1 = 0.7; BLGUI_a0a053cacf1c8c43346fdc3adb684cb7 = 0.0; end if (not BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1) then BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1 = 1.0; end frame:SetStatusBarColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7, BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1); frame.background = frame:CreateTexture(nil, "BACKGROUND"); frame.background:SetTexture(0, 0, 0, 0.5); frame.background:SetAllPoints(frame); frame.frame = CreateFrame("Frame", nil, frame); frame.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", -2, 2); frame.frame:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 2, 2); frame.frame:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -2, -2); frame.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, -2); frame.borderTopLeft = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderTopLeft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderTopLeft:SetTexCoord(0, 0.078125, 0.125, 0.3125); frame.borderTopLeft:SetPoint("TOPLEFT", frame.frame, "TOPLEFT", 0, 0); frame.borderTopLeft:SetWidth(5); frame.borderTopLeft:SetHeight(5); frame.borderTopRight = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderTopRight:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderTopRight:SetTexCoord(0.859375, 0.953125, 0.125, 0.3125); frame.borderTopRight:SetPoint("TOPRIGHT", frame.frame, "TOPRIGHT", 0, 0); frame.borderTopRight:SetWidth(6); frame.borderTopRight:SetHeight(5); frame.borderTop = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderTop:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderTop:SetTexCoord(0.09375, 0.171875, 0.125, 0.3125); frame.borderTop:SetPoint("TOPLEFT", frame.borderTopLeft, "TOPRIGHT", 0, 0); frame.borderTop:SetPoint("TOPRIGHT", frame.borderTopRight, "TOPLEFT", 0, 0); frame.borderTop:SetHeight(5); frame.borderBottomLeft = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderBottomLeft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderBottomLeft:SetTexCoord(0, 0.078125, 0.4375, 0.75); frame.borderBottomLeft:SetPoint("BOTTOMLEFT", frame.frame, "BOTTOMLEFT", 0, 0); frame.borderBottomLeft:SetWidth(5); frame.borderBottomLeft:SetHeight(5); frame.borderBottomRight = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderBottomRight:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderBottomRight:SetTexCoord(0.859375, 0.953125, 0.4375, 0.75); frame.borderBottomRight:SetPoint("BOTTOMRIGHT", frame.frame, "BOTTOMRIGHT", 0, 0); frame.borderBottomRight:SetWidth(6); frame.borderBottomRight:SetHeight(5); frame.borderBottom = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderBottom:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderBottom:SetTexCoord(0.09375, 0.171875, 0.4375, 0.75); frame.borderBottom:SetPoint("BOTTOMLEFT", frame.borderBottomLeft, "BOTTOMRIGHT", 0, 0); frame.borderBottom:SetPoint("BOTTOMRIGHT", frame.borderBottomRight, "BOTTOMLEFT", 0, 0); frame.borderBottom:SetHeight(5); frame.borderLeft = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderLeft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderLeft:SetTexCoord(0, 0.078125, 0.375, 0.375); frame.borderLeft:SetPoint("TOPLEFT", frame.borderTopLeft, "BOTTOMLEFT", 0, 0); frame.borderLeft:SetPoint("BOTTOMLEFT", frame.borderBottomLeft, "TOPLEFT", 0, 0); frame.borderLeft:SetWidth(5); frame.borderRight = frame.frame:CreateTexture(nil, "OVERLAY"); frame.borderRight:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFProgressBar"); frame.borderRight:SetTexCoord(0.859375, 0.953125, 0.375, 0.375); frame.borderRight:SetPoint("TOPRIGHT", frame.borderTopRight, "BOTTOMRIGHT", 0, 0); frame.borderRight:SetPoint("BOTTOMRIGHT", frame.borderBottomRight, "TOPRIGHT", 0, 0); frame.borderRight:SetWidth(6); self.frame = frame; end function BFProgressBar:SetRange(BLGUI_a22192947cbcf5f27a4eaf500379d03d, BLGUI_9226ee55ff8eed638d37ee13a4bdd517) self.frame:SetMinMaxValues(BLGUI_a22192947cbcf5f27a4eaf500379d03d, BLGUI_9226ee55ff8eed638d37ee13a4bdd517); end function BFProgressBar:GetRange() return self.frame:GetMinMaxValues(); end function BFProgressBar:SetPos(BLGUI_66fb91ae7efe85bf25d0a4760446c9c1) self.frame:SetValue(BLGUI_66fb91ae7efe85bf25d0a4760446c9c1); end function BFProgressBar:GetPos() return self.frame:GetValue(); end function BFProgressBar:GetFrame() return self.frame; end function BFProgressBar:OffsetPos(BLGUI_66fb91ae7efe85bf25d0a4760446c9c1) local BLGUI_2361bab8b48b1041ad740bb561b21aee = self.frame:GetValue(); local BLGUI_a22192947cbcf5f27a4eaf500379d03d, BLGUI_9226ee55ff8eed638d37ee13a4bdd517 = self.frame:GetMinMaxValues(); BLGUI_2361bab8b48b1041ad740bb561b21aee = BLGUI_2361bab8b48b1041ad740bb561b21aee + BLGUI_66fb91ae7efe85bf25d0a4760446c9c1; if (BLGUI_2361bab8b48b1041ad740bb561b21aee < BLGUI_a22192947cbcf5f27a4eaf500379d03d) then self.frame:SetPos(BLGUI_a22192947cbcf5f27a4eaf500379d03d); elseif (BLGUI_2361bab8b48b1041ad740bb561b21aee > BLGUI_9226ee55ff8eed638d37ee13a4bdd517) then self.frame:SetPos(BLGUI_9226ee55ff8eed638d37ee13a4bdd517); else self.frame:SetPos(BLGUI_2361bab8b48b1041ad740bb561b21aee); end end function BFProgressBar:SetColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7, BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1) self.frame:SetStatusBarColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7, BLGUI_e13a96a0ad2aafbc4af618967d6c0dc1); end BLGUI_665f77d44103340a4afde7c086158e86(BFProgressBar); BFTreeCtrlItem = {}; function BFTreeCtrlItem:constructor() self.class = "TreeViewItem"; self.height = 0; self.status = "normal"; self.text = ""; self.selected = nil; self.enabled = true; self.color = {a = 1.0, r = NORMAL_FONT_COLOR.r, g = NORMAL_FONT_COLOR.g, b = NORMAL_FONT_COLOR.b}; self.hilight_color = {a = 1.0, r = HIGHLIGHT_FONT_COLOR.r, g = HIGHLIGHT_FONT_COLOR.g, b = HIGHLIGHT_FONT_COLOR.b}; self.disabled_color = {a = 1.0, r = GRAY_FONT_COLOR.r, g = GRAY_FONT_COLOR.g, b = GRAY_FONT_COLOR.b}; end function BFTreeCtrlItem:SetTextColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7) self.color = {r = BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, g = BLGUI_0f402d7ba502a47a51c410aee99b1ff1, b = BLGUI_a0a053cacf1c8c43346fdc3adb684cb7}; end function BFTreeCtrlItem:SetHighlightTextColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7) self.hilight_color = { r = BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, g = BLGUI_0f402d7ba502a47a51c410aee99b1ff1, b = BLGUI_a0a053cacf1c8c43346fdc3adb684cb7}; end function BFTreeCtrlItem:SetDisabledTextColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7) self.disabled_color = {r = BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, g = BLGUI_0f402d7ba502a47a51c410aee99b1ff1, b = BLGUI_a0a053cacf1c8c43346fdc3adb684cb7}; end function BFTreeCtrlItem:SetText(BLGUI_e6955c64cf39bdb23dc86de1a9ec2117) self.text = BLGUI_e6955c64cf39bdb23dc86de1a9ec2117; end function BFTreeCtrlItem:GetText() return self.text; end function BFTreeCtrlItem:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656) self.height = BLGUI_ba70ac59c8a4b2cc67cf63223c84b656; end function BFTreeCtrlItem:GetHeight() return self.height; end function BFTreeCtrlItem:Anchor(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) assert(self.element ~= nil, "The tree item must be shown at first."); if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9) then self.element:SetPoint("TOP", BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element, "BOTTOM", 0, 0); else self.element:SetPoint("TOP", self.tree.childframe, "TOP", 0, 0); end end function BFTreeCtrlItem:Show() self.shown = true; end function BFTreeCtrlItem:Hide() assert(self.tree.pool ~= nil, "Invalid pool."); self.shown = nil; if (self.element) then self.element:Hide(); self.tree.pool:Drop(self.element); self.element = nil; end end function BFTreeCtrlItem:Enable() self.enabled = true; end function BFTreeCtrlItem:Disable() self.enabled = nil; end function BFTreeCtrlItem:IsEnabled() return self.enabled; end function BFTreeCtrlItem:SetData(BLGUI_8e6c2aaeb6b11f026ff5cb0a29aebe68) self.data = BLGUI_8e6c2aaeb6b11f026ff5cb0a29aebe68; end function BFTreeCtrlItem:GetData() return self.data; end function BFTreeCtrlItem:IsShown() if (self.shown) then return true; end end function BFTreeCtrlItem:SetStatus(BLGUI_238276267475ef8eca9456dbbcea0221) self.status = BLGUI_238276267475ef8eca9456dbbcea0221; end function BFTreeCtrlItem:GetStatus() return self.status; end function BFTreeCtrlItem:SetSelected(BLGUI_3209b0af7ce31343154ab56f1bb79adf) self.selected = BLGUI_3209b0af7ce31343154ab56f1bb79adf; end function BFTreeCtrlItem:IsSelected() return self.selected; end function BFTreeCtrlItem:Redraw() local BLGUI_411b8aa6d5954c6020f0b9c9e80e847a = self.element; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self; local BLGUI_8b24e30f462053ef17f6393eba61c88e = self.tree; local BLGUI_e78be88c90c01a0e7ddd02a947f8a32c = nil; local BLGUI_0db5ab7591386d733b59a51d951e85d0 = BLGUI_8b24e30f462053ef17f6393eba61c88e:GetItemLevel(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); local BLGUI_34bdfa87cdec2ef206841152f788e069 = (BLGUI_0db5ab7591386d733b59a51d951e85d0 - 1) * BLGUI_8b24e30f462053ef17f6393eba61c88e.item_height; BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:SetHeight(BLGUI_8b24e30f462053ef17f6393eba61c88e:GetItemHeight()); if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.status == "expanded" or BLGUI_2e00ffac12aadb3a1fd865993ec505b9.status == "collapsed") then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:Show(); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:SetWidth(BLGUI_8b24e30f462053ef17f6393eba61c88e:GetItemHeight()); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:SetHeight(BLGUI_8b24e30f462053ef17f6393eba61c88e:GetItemHeight()); if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.status == "expanded") then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:SetPoint("LEFT", BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "LEFT", BLGUI_34bdfa87cdec2ef206841152f788e069, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetNormalTexture():SetTexture("Interface\\Buttons\\UI-MinusButton-Up"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetPushedTexture():SetTexture("Interface\\Buttons\\UI-MinusButton-Down"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetDisabledTexture():SetTexture("Interface\\Buttons\\UI-MinusButton-Disabled"); elseif (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.status == "collapsed") then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:SetPoint("LEFT", BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "LEFT", BLGUI_34bdfa87cdec2ef206841152f788e069, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetNormalTexture():SetTexture("Interface\\Buttons\\UI-PlusButton-Up"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetPushedTexture():SetTexture("Interface\\Buttons\\UI-PlusButton-Down"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:GetDisabledTexture():SetTexture("Interface\\Buttons\\UI-PlusButton-Disabled"); end else BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:Hide(); end BLGUI_34bdfa87cdec2ef206841152f788e069 = BLGUI_34bdfa87cdec2ef206841152f788e069 + BLGUI_8b24e30f462053ef17f6393eba61c88e.item_height; if (not BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font) then if (not BFGUI_ITEM_DISABLED_FONT) then BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font = CreateFont("BFGUI_ITEM_DISABLED_FONT"); else BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font = BFGUI_ITEM_DISABLED_FONT; end BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font:CopyFontObject("GameFontNormal"); BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font:SetTextColor(self.disabled_color.r, self.disabled_color.g, self.disabled_color.b); end if (not BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font) then if (not BFGUI_ITEM_HIGHLIGHT_FONT) then BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font = CreateFont("BFGUI_ITEM_HIGHLIGHT_FONT"); else BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font = BFGUI_ITEM_HIGHLIGHT_FONT; end BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font:CopyFontObject("GameFontNormal"); BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font:SetTextColor(self.hilight_color.r, self.hilight_color.g, self.hilight_color.b); end if (not BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font) then if (not BFGUI_ITEM_NORMAL_FONT) then BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font = CreateFont("BFGUI_ITEM_NORMAL_FONT"); else BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font = BFGUI_ITEM_NORMAL_FONT; end BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font:CopyFontObject("GameFontNormal"); BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font:SetTextColor(self.color.r, self.color.g, self.color.b); end if (not BLGUI_2e00ffac12aadb3a1fd865993ec505b9:IsEnabled()) then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetNormalFontObject(BLGUI_8b24e30f462053ef17f6393eba61c88e.disabled_font); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:Hide(); elseif (BLGUI_2e00ffac12aadb3a1fd865993ec505b9:IsSelected()) then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetNormalFontObject(BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:Show(); else BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetNormalFontObject(BLGUI_8b24e30f462053ef17f6393eba61c88e.normal_font); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:Hide(); end BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetHighlightFontObject(BLGUI_8b24e30f462053ef17f6393eba61c88e.hilight_font); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetText(BLGUI_2e00ffac12aadb3a1fd865993ec505b9:GetText()); if (BLGUI_e78be88c90c01a0e7ddd02a947f8a32c) then BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetPoint("TOPLEFT", BLGUI_e78be88c90c01a0e7ddd02a947f8a32c, "TOPRIGHT", 0, 0); else BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetPoint("TOPLEFT", BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "TOPLEFT", BLGUI_34bdfa87cdec2ef206841152f788e069, 0); end BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetPoint("RIGHT", BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "RIGHT", 0, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetHeight(BLGUI_8b24e30f462053ef17f6393eba61c88e.item_height); local BLGUI_0cb0d86277670e463efaf13de596ff23 = BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:GetFontString(); BLGUI_0cb0d86277670e463efaf13de596ff23:SetJustifyH("LEFT"); BLGUI_0cb0d86277670e463efaf13de596ff23:SetJustifyV("CENTER"); BLGUI_0cb0d86277670e463efaf13de596ff23:ClearAllPoints(); BLGUI_0cb0d86277670e463efaf13de596ff23:SetShadowColor(0, 0, 0, 0); BLGUI_0cb0d86277670e463efaf13de596ff23:SetPoint("LEFT", BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text, "LEFT", 0, 1); BLGUI_0cb0d86277670e463efaf13de596ff23:SetWidth(BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:GetWidth()); BLGUI_0cb0d86277670e463efaf13de596ff23:SetHeight(BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:GetHeight()); BLGUI_0cb0d86277670e463efaf13de596ff23:SetFont(STANDARD_TEXT_FONT, 14); end function BLGUI_8242ea3314ded24d595f42cde91393d4(BLGUI_8b24e30f462053ef17f6393eba61c88e) local BLGUI_411b8aa6d5954c6020f0b9c9e80e847a = CreateFrame("Frame", nil, BLGUI_8b24e30f462053ef17f6393eba61c88e.childframe); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:SetPoint("LEFT", BLGUI_8b24e30f462053ef17f6393eba61c88e.childframe, "LEFT", 0, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:SetPoint("RIGHT", BLGUI_8b24e30f462053ef17f6393eba61c88e.childframe, "RIGHT", 0, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:SetPoint("TOP", BLGUI_8b24e30f462053ef17f6393eba61c88e.childframe, "TOP", 0, 0); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:SetHeight(BLGUI_8b24e30f462053ef17f6393eba61c88e:GetItemHeight()); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button = CreateFrame("Button", nil, BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "BFTreeCtrlItemButtonTemplate"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.button:SetScript("OnClick", function(self, button) local BLGUI_02b2fa622d572050b91ce5da67fdd997 = self:GetParent(); local BLGUI_4fc83ab35f91a12530b029343ee26dba = BLGUI_02b2fa622d572050b91ce5da67fdd997:GetParent(); local BLGUI_8b24e30f462053ef17f6393eba61c88e = BLGUI_4fc83ab35f91a12530b029343ee26dba.tree; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = BLGUI_02b2fa622d572050b91ce5da67fdd997.item; BLGUI_8b24e30f462053ef17f6393eba61c88e:SelectItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9:GetStatus() == "expanded") then BLGUI_8b24e30f462053ef17f6393eba61c88e:CollapseItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); elseif (BLGUI_2e00ffac12aadb3a1fd865993ec505b9:GetStatus() == "collapsed") then BLGUI_8b24e30f462053ef17f6393eba61c88e:ExpandItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end end); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text = CreateFrame("Button", nil, BLGUI_411b8aa6d5954c6020f0b9c9e80e847a, "BFTreeCtrlItemTemplate"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetScript("OnClick", function(self, button) local BLGUI_02b2fa622d572050b91ce5da67fdd997 = self:GetParent(); local BLGUI_4fc83ab35f91a12530b029343ee26dba = BLGUI_02b2fa622d572050b91ce5da67fdd997:GetParent(); local BLGUI_8b24e30f462053ef17f6393eba61c88e = BLGUI_4fc83ab35f91a12530b029343ee26dba.tree; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = BLGUI_02b2fa622d572050b91ce5da67fdd997.item; BLGUI_8b24e30f462053ef17f6393eba61c88e:SelectItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); if (BLGUI_8b24e30f462053ef17f6393eba61c88e.OnClick) then BLGUI_8b24e30f462053ef17f6393eba61c88e.OnClick(BLGUI_8b24e30f462053ef17f6393eba61c88e, BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end end); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetScript("OnEnter", function(self) local BLGUI_02b2fa622d572050b91ce5da67fdd997 = self:GetParent(); local BLGUI_4fc83ab35f91a12530b029343ee26dba = BLGUI_02b2fa622d572050b91ce5da67fdd997:GetParent(); local BLGUI_8b24e30f462053ef17f6393eba61c88e = BLGUI_4fc83ab35f91a12530b029343ee26dba.tree; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = BLGUI_02b2fa622d572050b91ce5da67fdd997.item; if (BLGUI_8b24e30f462053ef17f6393eba61c88e.OnEnter) then BLGUI_8b24e30f462053ef17f6393eba61c88e:OnEnter(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end end); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.text:SetScript("OnLeave", function(self) local BLGUI_02b2fa622d572050b91ce5da67fdd997 = self:GetParent(); local BLGUI_4fc83ab35f91a12530b029343ee26dba = BLGUI_02b2fa622d572050b91ce5da67fdd997:GetParent(); local BLGUI_8b24e30f462053ef17f6393eba61c88e = BLGUI_4fc83ab35f91a12530b029343ee26dba.tree; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = BLGUI_02b2fa622d572050b91ce5da67fdd997.item; if (BLGUI_8b24e30f462053ef17f6393eba61c88e.OnLeave) then BLGUI_8b24e30f462053ef17f6393eba61c88e:OnLeave(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end end); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar = BLGUI_411b8aa6d5954c6020f0b9c9e80e847a:CreateTexture(nil, "BACKGROUND"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:SetTexture("Interface\\QuestFrame\\UI-QuestLogTitleHighlight"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:SetBlendMode("ADD"); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:SetAllPoints(); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:SetVertexColor(1.0, 1.0, 0.0, 0.5); BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.bar:Hide(); return BLGUI_411b8aa6d5954c6020f0b9c9e80e847a; end BFTreeCtrl = {}; function BFTreeCtrl:constructor(BLGUI_1346009d8936868590c1d007e3efcfae, BLGUI_aacf928ffa23e474a000b1b6292d02a9, BLGUI_ba70ac59c8a4b2cc67cf63223c84b656) self.class = "TreeView"; self.width = BLGUI_aacf928ffa23e474a000b1b6292d02a9; self.height = BLGUI_ba70ac59c8a4b2cc67cf63223c84b656; self.item_height = 20; self.padding = 5; self.frame = CreateFrame("Frame", nil, BLGUI_1346009d8936868590c1d007e3efcfae); self.frame:SetWidth(BLGUI_aacf928ffa23e474a000b1b6292d02a9); self.frame:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656); self.frame:EnableMouse(true); self.frame.tree = self; self.frame:SetScript("OnShow", function(self) self.tree:Update(); if (self.tree.OnShow) then self.tree:OnShow(); end end); self.frame:SetScript("OnHide", function(self) if (self.tree.OnHide) then self.tree:OnHide(); end end); self.scrollframe = CreateFrame("ScrollFrame", nil, self.frame); self.scrollframe:ClearAllPoints(); self.scrollframe:SetPoint("LEFT", self.frame, "LEFT", 1, 0); self.scrollframe:SetPoint("RIGHT", self.frame, "RIGHT", -25, 0); self.scrollframe:SetPoint("TOP", self.frame, "TOP", 0, -self.padding); self.scrollframe:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, self.padding); self.scrollframe:EnableMouse(true); self.scrollframe:EnableMouseWheel(true); self.scrollframe:SetScript("OnMouseWheel", function(self, delta) local scrollbar = self.scrollbar; local scrollframe = scrollbar:GetParent(); local tree = self:GetParent().tree; if ( delta > 0 ) then scrollbar:SetValue(scrollbar:GetValue() - math.floor((scrollframe:GetHeight() / 2)/tree.item_height) * tree.item_height); else scrollbar:SetValue(scrollbar:GetValue() + math.floor((scrollframe:GetHeight() / 2)/tree.item_height) * tree.item_height); end end); self.scrollframe.scrollbar = CreateFrame("Slider", nil, self.scrollframe); self.scrollframe.scrollbar.up = CreateFrame("Button", nil, self.scrollframe.scrollbar); self.scrollframe.scrollbar.up:SetWidth(24); self.scrollframe.scrollbar.up:SetHeight(24); self.scrollframe.scrollbar.up:SetNormalTexture("Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Up"); self.scrollframe.scrollbar.up:SetPushedTexture("Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Down"); self.scrollframe.scrollbar.up:SetHighlightTexture("Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Disabled"); self.scrollframe.scrollbar.up:GetHighlightTexture():SetBlendMode("ADD"); self.scrollframe.scrollbar.up:SetDisabledTexture("Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Highlight"); self.scrollframe.scrollbar.up:SetPoint("BOTTOM", self.scrollframe.scrollbar, "TOP", 1, -8); self.scrollframe.scrollbar.up:SetScript("OnClick", function(self, button) local scrollbar = self:GetParent(); local tree = scrollbar:GetParent():GetParent().tree; local scrollframe = scrollbar:GetParent(); scrollbar:SetValue(scrollbar:GetValue() - tree.item_height); PlaySound("UChatScrollButton"); end); self.scrollframe.scrollbar.down = CreateFrame("Button", nil, self.scrollframe.scrollbar); self.scrollframe.scrollbar.down:SetWidth(24); self.scrollframe.scrollbar.down:SetHeight(24); self.scrollframe.scrollbar.down:SetNormalTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Up"); self.scrollframe.scrollbar.down:SetPushedTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Down"); self.scrollframe.scrollbar.down:SetHighlightTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Disabled"); self.scrollframe.scrollbar.down:GetHighlightTexture():SetBlendMode("ADD"); self.scrollframe.scrollbar.down:SetDisabledTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Highlight"); self.scrollframe.scrollbar.down:SetPoint("TOP", self.scrollframe.scrollbar, "BOTTOM", 1, 7); self.scrollframe.scrollbar.down:SetScript("OnClick", function(self, button) local scrollbar = self:GetParent(); local tree = scrollbar:GetParent():GetParent().tree; local scrollframe = scrollbar:GetParent(); scrollbar:SetValue(scrollbar:GetValue() + tree.item_height); PlaySound("UChatScrollButton"); end); self.scrollframe.scrollbar:SetOrientation("VERTICAL"); self.scrollframe.scrollbar:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob"); local BLGUI_f06c87b1b2e560b952526bce62d940af = self.scrollframe.scrollbar:GetThumbTexture(); BLGUI_f06c87b1b2e560b952526bce62d940af:SetTexCoord(0.125, 0.825, 0.125, 0.825); BLGUI_f06c87b1b2e560b952526bce62d940af:SetWidth(16); BLGUI_f06c87b1b2e560b952526bce62d940af:SetHeight(16); self.scrollframe.scrollbar:SetWidth(24); self.scrollframe.scrollbar:SetPoint("TOPLEFT", self.scrollframe, "TOPRIGHT", 0, -12); self.scrollframe.scrollbar:SetPoint("BOTTOMLEFT", self.scrollframe, "BOTTOMRIGHT", 0, 12); self.scrollframe.scrollbar:SetScript("OnValueChanged", function(self, value) local BLGUI_c69530c27b463b241ff83d8e556ebc4e = self:GetParent(); local BLGUI_411b8aa6d5954c6020f0b9c9e80e847a = BLGUI_c69530c27b463b241ff83d8e556ebc4e:GetParent(); local BLGUI_8b24e30f462053ef17f6393eba61c88e = BLGUI_411b8aa6d5954c6020f0b9c9e80e847a.tree; BLGUI_8b24e30f462053ef17f6393eba61c88e:Update(); end); self.childframe = CreateFrame("Frame", nil, self.scrollframe); self.scrollframe:SetScrollChild(self.childframe); self.childframe:SetPoint("TOPLEFT", self.scrollframe, "TOPLEFT", 5, 0); self.childframe:SetPoint("BOTTOMRIGHT", self.scrollframe, "BOTTOMRIGHT", -5, 0); self.childframe:SetScript("OnSizeChanged", function(self) self.tree:Update(); end); self.childframe.tree = self; self.scrollframe.tree = self; self.tree = BLibrary("BTree"); self.pool = BLibrary("BPool", BLGUI_8242ea3314ded24d595f42cde91393d4, self); self.scrollframe.scrollbar:SetMinMaxValues(0, 0); self.scrollframe.scrollbar:SetValue(0); self.scrollframe.scrollbar:SetValueStep(self.item_height); end function BFTreeCtrl:Attach(BLGUI_49ccc92cd1bef60d860c1c7f84aaab89, BLGUI_2e00ffac12aadb3a1fd865993ec505b9, __mode) assert(type(BLGUI_49ccc92cd1bef60d860c1c7f84aaab89) == "table", "Invalid table."); local BLGUI_413bf9c15ce77baa8ebf1cda4cbf4887, BLGUI_2361bab8b48b1041ad740bb561b21aee; local BLGUI_dd831db92f39c73af9d9713e4d3a1e69; local BLGUI_dc7347306d5d94d3c46f5a8a1f259196; local BLGUI_2fdb26f87b6a2704c47ed62c13229c94; local BLGUI_9c7073e5503c64bb5756d30822798008; for BLGUI_413bf9c15ce77baa8ebf1cda4cbf4887, BLGUI_2361bab8b48b1041ad740bb561b21aee in ipairs(BLGUI_49ccc92cd1bef60d860c1c7f84aaab89) do BLGUI_dd831db92f39c73af9d9713e4d3a1e69 = BLibrary("BFTreeCtrlItem"); BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetText(BLGUI_2361bab8b48b1041ad740bb561b21aee["text"]); BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetData(BLGUI_2361bab8b48b1041ad740bb561b21aee["data"]); if (BLGUI_2361bab8b48b1041ad740bb561b21aee["color"]) then BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetTextColor(BLGUI_2361bab8b48b1041ad740bb561b21aee["color"].r, BLGUI_2361bab8b48b1041ad740bb561b21aee["color"].g, BLGUI_2361bab8b48b1041ad740bb561b21aee["color"].b); else BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b); end if (BLGUI_2361bab8b48b1041ad740bb561b21aee["highlight_color"]) then BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetHighlightTextColor(BLGUI_2361bab8b48b1041ad740bb561b21aee["highlight_color"].r, BLGUI_2361bab8b48b1041ad740bb561b21aee["highlight_color"].g, BLGUI_2361bab8b48b1041ad740bb561b21aee["highlight_color"].b); else BLGUI_dd831db92f39c73af9d9713e4d3a1e69:SetHighlightTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); end if (not BLGUI_2fdb26f87b6a2704c47ed62c13229c94) then BLGUI_9c7073e5503c64bb5756d30822798008, BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = self:InsertItem(BLGUI_dd831db92f39c73af9d9713e4d3a1e69, BLGUI_2e00ffac12aadb3a1fd865993ec505b9, __mode); else BLGUI_fa2167574a7f10a8ceef1d978b1d1540, BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = self:InsertItem(BLGUI_dd831db92f39c73af9d9713e4d3a1e69, BLGUI_2fdb26f87b6a2704c47ed62c13229c94, "after"); end BLGUI_2fdb26f87b6a2704c47ed62c13229c94 = BLGUI_dd831db92f39c73af9d9713e4d3a1e69; if (BLGUI_2361bab8b48b1041ad740bb561b21aee["child"]) then if (BLGUI_dd831db92f39c73af9d9713e4d3a1e69 == BLGUI_dc7347306d5d94d3c46f5a8a1f259196) then BLGUI_fa2167574a7f10a8ceef1d978b1d1540, BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = self:Attach(BLGUI_2361bab8b48b1041ad740bb561b21aee["child"], BLGUI_dd831db92f39c73af9d9713e4d3a1e69, "child"); else self:Attach(BLGUI_2361bab8b48b1041ad740bb561b21aee["child"], BLGUI_dd831db92f39c73af9d9713e4d3a1e69, "child"); end end end return BLGUI_9c7073e5503c64bb5756d30822798008, BLGUI_dc7347306d5d94d3c46f5a8a1f259196; end function BFTreeCtrl:SetBorder(BLGUI_143bdb15d7e810c5fd0731dbe53ec3b0) if (BLGUI_143bdb15d7e810c5fd0731dbe53ec3b0) then self.frame:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 4, right = 4, top = 4, bottom = 4 }}); self.frame:SetBackdropColor(0, 0, 0, 0.5); else self.frame:SetBackdrop(nil); end end function BFTreeCtrl:SetItemHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656) if (self.item_height ~= BLGUI_ba70ac59c8a4b2cc67cf63223c84b656) then local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Root(); while (BLGUI_2e00ffac12aadb3a1fd865993ec505b9) do BLGUI_2e00ffac12aadb3a1fd865993ec505b9:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656); BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); end self.item_height = BLGUI_ba70ac59c8a4b2cc67cf63223c84b656; end self:Update(); end function BFTreeCtrl:BeginTransaction() self.transaction = true; end function BFTreeCtrl:EndTransaction() self.transaction = nil; self:Update(); end function BFTreeCtrl:GetItemHeight() return self.item_height; end function BFTreeCtrl:GetItemCount() return self.tree:Count(); end function BFTreeCtrl:Update() if (self.transaction) then return; end if (not self.frame or not self.frame:IsShown()) then return; end local scrollframe = self.scrollframe; local childframe = self.childframe; local scrollbar = scrollframe.scrollbar; self.max_item = math.floor(self.childframe:GetHeight()/self.item_height + 0.5); local BLGUI_2361bab8b48b1041ad740bb561b21aee = scrollbar:GetValue(); local __index = 0; local BLGUI_1602adfeadb8bf822a04683635cbde27 = math.floor(BLGUI_2361bab8b48b1041ad740bb561b21aee/self.item_height + 0.5); local BLGUI_dc7347306d5d94d3c46f5a8a1f259196; local BLGUI_219e9e4e2b964752471152b81d93e467 = 0; local BLGUI_ba70ac59c8a4b2cc67cf63223c84b656 = 0; local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self:GetRootItem(); while (BLGUI_2e00ffac12aadb3a1fd865993ec505b9) do if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9:IsShown()) then if (__index >= BLGUI_1602adfeadb8bf822a04683635cbde27 and __index < BLGUI_1602adfeadb8bf822a04683635cbde27 + self.max_item) then if (not BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element) then BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element = self.pool:Get(); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element.item = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; end BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Redraw(); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element:Show(); BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Anchor(BLGUI_dc7347306d5d94d3c46f5a8a1f259196); BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; else if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element) then self.pool:Drop(BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element:Hide(); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element = nil; end end __index = __index + 1; BLGUI_ba70ac59c8a4b2cc67cf63223c84b656 = BLGUI_ba70ac59c8a4b2cc67cf63223c84b656 + self.item_height; BLGUI_219e9e4e2b964752471152b81d93e467 = BLGUI_219e9e4e2b964752471152b81d93e467 + 1; else if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element) then self.pool:Drop(BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element:Hide(); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.element = nil; end end BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self:GetNextItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end if (BLGUI_219e9e4e2b964752471152b81d93e467 > self.max_item) then scrollbar:Show(); scrollbar:SetMinMaxValues(0, BLGUI_ba70ac59c8a4b2cc67cf63223c84b656 - self.max_item * self.item_height + self.item_height); else scrollbar:Hide(); scrollbar:SetMinMaxValues(0, 0); if (scrollbar:GetValue() ~= 0) then scrollbar:SetValue(0); end end end function BFTreeCtrl:InsertItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_dc0fe7e5cdedeee808957fa365a170d9, __mode) if (BLGUI_2e00ffac12aadb3a1fd865993ec505b9.class ~= "TreeViewItem") then self:Attach(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_dc0fe7e5cdedeee808957fa365a170d9, __mode); return; end local BLGUI_01c1d8f50beaf93a3f8738830b32ee5a; local BLGUI_1c22b99deff300cdd7800f4609cfc93d; local BLGUI_dc7347306d5d94d3c46f5a8a1f259196; if (BLGUI_dc0fe7e5cdedeee808957fa365a170d9) then BLGUI_01c1d8f50beaf93a3f8738830b32ee5a = self:GetLastItem(BLGUI_dc0fe7e5cdedeee808957fa365a170d9); BLGUI_1c22b99deff300cdd7800f4609cfc93d = self:GetNextItem(BLGUI_dc0fe7e5cdedeee808957fa365a170d9); end self.tree:Insert(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_dc0fe7e5cdedeee808957fa365a170d9, __mode); BLGUI_2e00ffac12aadb3a1fd865993ec505b9.tree = self; if (__mode == "before") then if (not BLGUI_dc0fe7e5cdedeee808957fa365a170d9 or BLGUI_dc0fe7e5cdedeee808957fa365a170d9:IsShown()) then BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Show(); end BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_dc0fe7e5cdedeee808957fa365a170d9; elseif (__mode == "child") then assert(BLGUI_dc0fe7e5cdedeee808957fa365a170d9 ~= nil, "Cannot insert root item as child."); if (BLGUI_dc0fe7e5cdedeee808957fa365a170d9:GetStatus() == "expanded") then BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Show(); end if (BLGUI_dc0fe7e5cdedeee808957fa365a170d9:GetStatus() == "normal") then BLGUI_dc0fe7e5cdedeee808957fa365a170d9:SetStatus("collapsed"); end BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; else if (not BLGUI_dc0fe7e5cdedeee808957fa365a170d9 or BLGUI_dc0fe7e5cdedeee808957fa365a170d9:IsShown()) then BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Show(); end BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; end if (self.OnItemInserted) then self:OnItemInserted(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end self:Update(); return BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_dc7347306d5d94d3c46f5a8a1f259196; end function BFTreeCtrl:DeleteAllItems() local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Root(); local BLGUI_edbee802d3916620e099502d0cfa7f6e = BLGUI_2e00ffac12aadb3a1fd865993ec505b9 while (BLGUI_edbee802d3916620e099502d0cfa7f6e) do BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Next(BLGUI_edbee802d3916620e099502d0cfa7f6e, "sibling"); self:DeleteItem(BLGUI_edbee802d3916620e099502d0cfa7f6e); BLGUI_edbee802d3916620e099502d0cfa7f6e = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; end end function BFTreeCtrl:DeleteItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) self.tree.control = self; self.tree.OnDeleted = function(BLGUI_8b24e30f462053ef17f6393eba61c88e, BLGUI_132335f8226aa911b8096f03c24fe155) if (BLGUI_132335f8226aa911b8096f03c24fe155.element) then BLGUI_8b24e30f462053ef17f6393eba61c88e.control.pool:Drop(BLGUI_132335f8226aa911b8096f03c24fe155.element); BLGUI_132335f8226aa911b8096f03c24fe155.element:Hide(); BLGUI_132335f8226aa911b8096f03c24fe155.element = nil; end end; self.tree:Delete(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); self:Update(); end function BFTreeCtrl:GetLastSiblingItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Last(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "sibling"); end function BFTreeCtrl:GetLastItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Last(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); end function BFTreeCtrl:FindItem(BLGUI_41d48caa377759cbe469d39f96b9f871) return self.tree:Find(BLGUI_41d48caa377759cbe469d39f96b9f871, "normal"); end function BFTreeCtrl:GetItemLevel(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Level(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end function BFTreeCtrl:GetNextSiblingItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "sibling"); end function BFTreeCtrl:GetNextItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); end function BFTreeCtrl:GetNextVisibleItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) local BLGUI_1c22b99deff300cdd7800f4609cfc93d = self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); while (BLGUI_1c22b99deff300cdd7800f4609cfc93d and not BLGUI_1c22b99deff300cdd7800f4609cfc93d:IsShown()) do BLGUI_1c22b99deff300cdd7800f4609cfc93d = self.tree:Next(BLGUI_1c22b99deff300cdd7800f4609cfc93d, "all"); end return BLGUI_1c22b99deff300cdd7800f4609cfc93d; end function BFTreeCtrl:GetLastVisibleItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) local BLGUI_01c1d8f50beaf93a3f8738830b32ee5a = self.tree:Last(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); while (BLGUI_01c1d8f50beaf93a3f8738830b32ee5a and not BLGUI_01c1d8f50beaf93a3f8738830b32ee5a:IsShown()) do BLGUI_01c1d8f50beaf93a3f8738830b32ee5a = self.tree:Last(BLGUI_01c1d8f50beaf93a3f8738830b32ee5a, "all"); end return BLGUI_01c1d8f50beaf93a3f8738830b32ee5a; end function BFTreeCtrl:GetParentItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Parent(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end function BFTreeCtrl:GetFirstChildItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) return self.tree:Child(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end function BFTreeCtrl:GetRootItem() return self.tree:Root(); end function BFTreeCtrl:ExpandAllItems() local BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Root(); while (BLGUI_2e00ffac12aadb3a1fd865993ec505b9) do if (self.tree:Child(BLGUI_2e00ffac12aadb3a1fd865993ec505b9)) then self:ExpandItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "all"); end end function BFTreeCtrl:ExpandItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) local BLGUI_b09b38db28c736e12b1ab4ee2d188a8a = self.tree:Child(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); local BLGUI_802fae006aa3ef201750188cca04d00d = self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "sibling"); local BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; while (BLGUI_b09b38db28c736e12b1ab4ee2d188a8a and self.tree:IsChild(BLGUI_b09b38db28c736e12b1ab4ee2d188a8a, BLGUI_2e00ffac12aadb3a1fd865993ec505b9)) do if (not BLGUI_b09b38db28c736e12b1ab4ee2d188a8a:IsShown()) then BLGUI_b09b38db28c736e12b1ab4ee2d188a8a:Show(); end if (BLGUI_b09b38db28c736e12b1ab4ee2d188a8a:GetStatus() == "expanded") then BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = self:ExpandItem(BLGUI_b09b38db28c736e12b1ab4ee2d188a8a); else BLGUI_dc7347306d5d94d3c46f5a8a1f259196 = BLGUI_b09b38db28c736e12b1ab4ee2d188a8a; end BLGUI_b09b38db28c736e12b1ab4ee2d188a8a = self.tree:Next(BLGUI_b09b38db28c736e12b1ab4ee2d188a8a, "sibling"); end BLGUI_2e00ffac12aadb3a1fd865993ec505b9:SetStatus("expanded"); self:Update(); return BLGUI_dc7347306d5d94d3c46f5a8a1f259196; end function BFTreeCtrl:CollapseItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) local BLGUI_b09b38db28c736e12b1ab4ee2d188a8a = self.tree:Child(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); local BLGUI_802fae006aa3ef201750188cca04d00d = self.tree:Next(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, "sibling"); while (BLGUI_b09b38db28c736e12b1ab4ee2d188a8a and self.tree:IsChild(BLGUI_b09b38db28c736e12b1ab4ee2d188a8a, BLGUI_2e00ffac12aadb3a1fd865993ec505b9)) do if (BLGUI_b09b38db28c736e12b1ab4ee2d188a8a:IsShown()) then BLGUI_b09b38db28c736e12b1ab4ee2d188a8a:Hide(); end BLGUI_b09b38db28c736e12b1ab4ee2d188a8a = self.tree:Next(BLGUI_b09b38db28c736e12b1ab4ee2d188a8a, "all"); end BLGUI_2e00ffac12aadb3a1fd865993ec505b9:SetStatus("collapsed"); if (self.OnItemCollapsed) then self:OnItemCollapsed(BLGUI_2e00ffac12aadb3a1fd865993ec505b9); end self:Update(); end function BFTreeCtrl:SelectItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9) if (self.BLGUI_5303014548bbfe82dafd289ad38fb0ef ~= BLGUI_2e00ffac12aadb3a1fd865993ec505b9) then local BLGUI_dd759702c4867e114edab122ed0d11d3 = self.BLGUI_5303014548bbfe82dafd289ad38fb0ef; if (self.BLGUI_5303014548bbfe82dafd289ad38fb0ef) then self.BLGUI_5303014548bbfe82dafd289ad38fb0ef:SetSelected(false); if (self.BLGUI_5303014548bbfe82dafd289ad38fb0ef.element) then self.BLGUI_5303014548bbfe82dafd289ad38fb0ef:Redraw(); end end BLGUI_2e00ffac12aadb3a1fd865993ec505b9:SetSelected(true); BLGUI_2e00ffac12aadb3a1fd865993ec505b9:Redraw(); self.BLGUI_5303014548bbfe82dafd289ad38fb0ef = BLGUI_2e00ffac12aadb3a1fd865993ec505b9; if (BFTreeCtrl.OnItemChanged) then BFTreeCtrl:OnItemChanged(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_dd759702c4867e114edab122ed0d11d3); end end end function BFTreeCtrl:Show() self:Update(); self.frame:Show(); end BLGUI_665f77d44103340a4afde7c086158e86(BFTreeCtrl); BFButton = {}; function BFButton:constructor(BLGUI_1346009d8936868590c1d007e3efcfae, BLGUI_aacf928ffa23e474a000b1b6292d02a9, BLGUI_ba70ac59c8a4b2cc67cf63223c84b656, BLGUI_e0e85008d0859db6bb769f09cf1b7b30) self.frame = CreateFrame("Frame", nil, BLGUI_1346009d8936868590c1d007e3efcfae); self.frame.text = self.frame:CreateFontString(nil, "OVERLAY", "NumberFont_Shadow_Med"); self.frame.text:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b); self.frame.border_topleft = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_topleft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_topleft:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0); self.frame.border_topleft:SetWidth(8); self.frame.border_topleft:SetHeight(8); self.frame.border_topright = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_topright:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_topright:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", 0, 0); self.frame.border_topright:SetWidth(8); self.frame.border_topright:SetHeight(8); self.frame.border_top = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_top:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_top:SetPoint("LEFT", self.frame.border_topleft, "RIGHT", 0, 0); self.frame.border_top:SetPoint("RIGHT", self.frame.border_topright, "LEFT", 0, 0); self.frame.border_top:SetHeight(8); self.frame.border_bottomleft = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_bottomleft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_bottomleft:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0); self.frame.border_bottomleft:SetWidth(8); self.frame.border_bottomleft:SetHeight(8); self.frame.border_bottomright = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_bottomright:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_bottomright:SetPoint("BOTTOMRIGHT", self.frame, "BOTTOMRIGHT", 0, 0); self.frame.border_bottomright:SetWidth(8); self.frame.border_bottomright:SetHeight(8); self.frame.border_bottom = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_bottom:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_bottom:SetPoint("LEFT", self.frame.border_bottomleft, "RIGHT", 0, 0); self.frame.border_bottom:SetPoint("RIGHT", self.frame.border_bottomright, "LEFT", 0, 0); self.frame.border_bottom:SetHeight(8); self.frame.border_left = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_left:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_left:SetWidth(8); self.frame.border_left:SetPoint("TOPLEFT", self.frame.border_topleft, "BOTTOMLEFT", 0, 0); self.frame.border_left:SetPoint("BOTTOMLEFT", self.frame.border_bottomleft, "TOPLEFT", 0, 0); self.frame.border_right = self.frame:CreateTexture(nil, "BORDER"); self.frame.border_right:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.border_right:SetWidth(8); self.frame.border_right:SetPoint("TOPRIGHT", self.frame.border_topright, "BOTTOMRIGHT", 0, 0); self.frame.border_right:SetPoint("BOTTOMRIGHT", self.frame.border_bottomright, "TOPRIGHT", 0, 0); self.frame.back_topleft = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_topleft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_topleft:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, -3); self.frame.back_topleft:SetWidth(8); self.frame.back_topleft:SetHeight(8); self.frame.back_topright = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_topright:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_topright:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -2, -3); self.frame.back_topright:SetWidth(8); self.frame.back_topright:SetHeight(8); self.frame.back_top = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_top:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_top:SetPoint("LEFT", self.frame.back_topleft, "RIGHT", 0, 0); self.frame.back_top:SetPoint("RIGHT", self.frame.back_topright, "LEFT", 0, 0); self.frame.back_top:SetHeight(8); self.frame.back_bottomleft = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_bottomleft:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_bottomleft:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 2); self.frame.back_bottomleft:SetWidth(8); self.frame.back_bottomleft:SetHeight(8); self.frame.back_bottomright = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_bottomright:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_bottomright:SetPoint("BOTTOMRIGHT", self.frame, "BOTTOMRIGHT", -2, 2); self.frame.back_bottomright:SetWidth(8); self.frame.back_bottomright:SetHeight(8); self.frame.back_bottom = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_bottom:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_bottom:SetPoint("LEFT", self.frame.back_bottomleft, "RIGHT", 0, 0); self.frame.back_bottom:SetPoint("RIGHT", self.frame.back_bottomright, "LEFT", 0, 0); self.frame.back_bottom:SetHeight(8); self.frame.back_left = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_left:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_left:SetWidth(8); self.frame.back_left:SetPoint("TOPLEFT", self.frame.back_topleft, "BOTTOMLEFT", 0, 0); self.frame.back_left:SetPoint("BOTTOMLEFT", self.frame.back_bottomleft, "TOPLEFT", 0, 0); self.frame.back_right = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_right:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_right:SetWidth(8); self.frame.back_right:SetPoint("TOPRIGHT", self.frame.back_topright, "BOTTOMRIGHT", 0, 0); self.frame.back_right:SetPoint("BOTTOMRIGHT", self.frame.back_bottomright, "TOPRIGHT", 0, 0); self.frame.back_center = self.frame:CreateTexture(nil, "BACKGROUND"); self.frame.back_center:SetTexture("Interface\\AddOns\\BigFoot\\Library\\Artworks\\BFButton"); self.frame.back_center:SetPoint("TOPLEFT", self.frame.back_topleft, "BOTTOMRIGHT", 0, 0); self.frame.back_center:SetPoint("BOTTOMRIGHT", self.frame.back_bottomright, "TOPLEFT", 0, 0); self.frame.hilight = self.frame:CreateTexture(nil, "OVERLAY"); self.frame.hilight:SetTexture("Interface\\Buttons\\UI-Panel-Button-Highlight"); self.frame.hilight:SetBlendMode("ADD"); self.frame.hilight:SetTexCoord(0, 0.625, 0, 0.6875); self.frame.hilight:SetAllPoints(); self.frame.hilight:Hide(); self.frame:SetWidth(BLGUI_aacf928ffa23e474a000b1b6292d02a9); self.frame:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656); self.frame.button = CreateFrame("Button", nil, self.frame); self.frame.button.object = self; self.frame.button:SetWidth(BLGUI_aacf928ffa23e474a000b1b6292d02a9); self.frame.button:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656); self.frame.button:SetAllPoints(); self.frame.button:SetScript("OnMouseDown", function(self, button) self.object:SetButtonState("pushed"); if (self.object.OnMouseDown) then self.object.OnMouseDown(self.object); end end); self.frame.button:SetScript("OnMouseUp", function(self, button) self.object:SetButtonState("normal"); if (self.object.OnMouseUp) then self.object.OnMouseUp(self.object); end end); self.frame.button:SetScript("OnEnter", function(self, button) self.object.frame.hilight:Show(); self.object.frame.text:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); end); self.frame.button:SetScript("OnLeave", function(self, button) self.object.frame.hilight:Hide(); self.object.frame.text:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b); end); self.frame.button:SetScript("OnClick", function(self, button) if (self.object.OnClick) then self.object.OnClick(self.object); end end); self:SetButtonState("normal"); if (not BLGUI_e0e85008d0859db6bb769f09cf1b7b30) then self:SetBackColor(0.7, 0.0, 0.0); else self:SetBackColor(BLGUI_e0e85008d0859db6bb769f09cf1b7b30.r, BLGUI_e0e85008d0859db6bb769f09cf1b7b30.g, BLGUI_e0e85008d0859db6bb769f09cf1b7b30.b); end end local function BLGUI_94a3dcf444878358b35ff6a3a2267647(BLGUI_92fc56267c7e14d288fbcf74f912203d, BLGUI_eada6c7b715e634a0f10a59caa7a63a2, BLGUI_0694c14294eb642e50750f9964155ae0, BLGUI_2f3acdeb071461a90aa82978f92256fc) return BLGUI_92fc56267c7e14d288fbcf74f912203d/128, BLGUI_eada6c7b715e634a0f10a59caa7a63a2/128, BLGUI_0694c14294eb642e50750f9964155ae0/128, BLGUI_2f3acdeb071461a90aa82978f92256fc/128; end function BFButton:SetBackColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7) self.frame.back_topleft:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_topright:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_top:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_bottomleft:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_bottomright:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_bottom:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_left:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_right:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); self.frame.back_center:SetVertexColor(BLGUI_3ae1f2c4b38d5f7c356b4cdb7c6e4027, BLGUI_0f402d7ba502a47a51c410aee99b1ff1, BLGUI_a0a053cacf1c8c43346fdc3adb684cb7); end function BFButton:SetButtonState(state) local BLGUI_5d66b7c65b51c8ee41b6737fe02cd084 = 0; if (state == "normal") then BLGUI_5d66b7c65b51c8ee41b6737fe02cd084 = 0; self.frame.text:SetPoint("CENTER", self.frame, "CENTER", 0, 0); elseif (state == "pushed") then BLGUI_5d66b7c65b51c8ee41b6737fe02cd084 = 24; self.frame.text:SetPoint("CENTER", self.frame, "CENTER", 1, -1); end self.frame.border_topleft:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 8, 48, 55)); self.frame.border_topright:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(119, 126, 48, 55)); self.frame.border_top:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(8, 15, 48, 55)); self.frame.border_bottomleft:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 8, 64, 71)); self.frame.border_bottomright:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(119, 126, 64, 71)); self.frame.border_bottom:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(8, 15, 64, 71)); self.frame.border_left:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 8, 56, 63)); self.frame.border_right:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(119, 126, 56, 63)); self.frame.back_topleft:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 7, 0 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 7 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_topright:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(116, 123, 0 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 7 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_top:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(8, 15, 0 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 7 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_bottomleft:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 7, 11 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 18 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_bottomright:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(116, 123, 11 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 18 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_bottom:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(8, 15, 11 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 18 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_left:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(0, 7, 8 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 10 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_right:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(116, 123, 8 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 10 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); self.frame.back_center:SetTexCoord(BLGUI_94a3dcf444878358b35ff6a3a2267647(8, 15, 8 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084, 10 + BLGUI_5d66b7c65b51c8ee41b6737fe02cd084)); end function BFButton:SetText(BLGUI_e6955c64cf39bdb23dc86de1a9ec2117) self.frame.text:SetText(BLGUI_e6955c64cf39bdb23dc86de1a9ec2117); end function BFButton:GetText(BLGUI_e6955c64cf39bdb23dc86de1a9ec2117) return self.frame.text:GetText(); end BLGUI_665f77d44103340a4afde7c086158e86(BFButton); BFLock = {}; local function BLGUI_c2b39875a344d8fa40c4f2fb4c78d8ff(button,isLocked) if isLocked then button:SetNormalTexture("Interface\\AddOns\\BigFoot\\Media\\LockButton-Locked-Up") button:SetPushedTexture("Interface\\AddOns\\BigFoot\\Media\\LockButton-Locked-Down") else button:SetNormalTexture("Interface\\AddOns\\BigFoot\\Media\\LockButton-Unlocked-Up") button:SetPushedTexture("Interface\\AddOns\\BigFoot\\Media\\LockButton-Unlocked-Up") end end function BFLock:constructor(BLGUI_1346009d8936868590c1d007e3efcfae,BLGUI_6c0a7730f92e2de6555fb02d13dccacc,config,...) local toolTips = {...} self.frame = CreateFrame("Button",BLGUI_1346009d8936868590c1d007e3efcfae:GetName().."LockButton",BLGUI_1346009d8936868590c1d007e3efcfae,"BF_LockButtonTemplate") self.frame:SetPoint("RIGHT",BLGUI_1346009d8936868590c1d007e3efcfae,"TOPRIGHT",0,-13) self.config = config if not self.config then return end BLGUI_c2b39875a344d8fa40c4f2fb4c78d8ff(self.frame,self.config.isLocked) BLGUI_1346009d8936868590c1d007e3efcfae:SetScript("OnMouseDown",function(button) if not self.config.isLocked then BLGUI_6c0a7730f92e2de6555fb02d13dccacc:StartMoving(); end end) BLGUI_1346009d8936868590c1d007e3efcfae:SetScript("OnMouseUp",function(button) if not self.config.isLocked then BLGUI_6c0a7730f92e2de6555fb02d13dccacc:StopMovingOrSizing(); end end) BLGUI_1346009d8936868590c1d007e3efcfae:SetScript("OnHide",function(button) BLGUI_6c0a7730f92e2de6555fb02d13dccacc:StopMovingOrSizing(); end) BLGUI_1346009d8936868590c1d007e3efcfae:SetScript("OnEnter",function(button) BigFoot_ShowNewbieTooltip(unpack(toolTips)); end) BLGUI_1346009d8936868590c1d007e3efcfae:SetScript("OnLeave",function(button) BigFoot_HideNewbieTooltip() end) self.frame:SetScript("OnClick",function() self.config.isLocked = not self.config.isLocked BLGUI_c2b39875a344d8fa40c4f2fb4c78d8ff(self.frame,self.config.isLocked) end) self.frame:Show() end BLGUI_665f77d44103340a4afde7c086158e86(BFLock); BFSearch = {} local function BLGUI_fdc18637a5aac28250b4e30d121867da(self) local isValid = true if self.validation then isValid = self.validation(_G[self.frame:GetName().."EditBox"]:GetText()) end _G[self.frame:GetName().."EditBox"]:AddHistoryLine(_G[self.frame:GetName().."EditBox"]:GetText()) if isValid and self.callback then if self.peek then local result = self.peek(_G[self.frame:GetName().."EditBox"]:GetText()) if not result then if self.onEmpty then self.onEmpty(_G[self.frame:GetName().."EditBox"]:GetText()) end _G[self.frame:GetName().."EditBox"]:SetFocus() _G[self.frame:GetName().."EditBox"]:HighlightText() elseif self.callback and strlen(_G[self.frame:GetName().."EditBox"]:GetText())>3 then self.callback(_G[self.frame:GetName().."EditBox"]:GetText()) _G[self.frame:GetName().."EditBox"]:ClearFocus() end elseif self.callback then self.callback(_G[self.frame:GetName().."EditBox"]:GetText()) _G[self.frame:GetName().."EditBox"]:ClearFocus() end else if self.onFailed then self.onFailed(_G[self.frame:GetName().."EditBox"]:GetText()) end _G[self.frame:GetName().."EditBox"]:SetFocus() _G[self.frame:GetName().."EditBox"]:HighlightText() end end --[[ BFSearch 创建时的参数： BLGUI_1346009d8936868590c1d007e3efcfae 为 富框体 BLGUI_aacf928ffa23e474a000b1b6292d02a9 为搜索框宽度 BLGUI_ba70ac59c8a4b2cc67cf63223c84b656 为搜索框高度 BLGUI_28d1ce9d934ec0135426813943dd429c 为搜索框内默认文字 使用时的回调参数 .callback为点击按钮时的回调函数（参数为editbox内的文字) .validation为搜索文字验证函数 .onFailed为验证失败时的回调函数 .peek检查搜索是否能返回结果 .onEmpty为搜索为空时的结果 ]] function BFSearch:constructor(BLGUI_1346009d8936868590c1d007e3efcfae,BLGUI_aacf928ffa23e474a000b1b6292d02a9,BLGUI_ba70ac59c8a4b2cc67cf63223c84b656,BLGUI_28d1ce9d934ec0135426813943dd429c) self.frame = CreateFrame("Frame",BLGUI_1346009d8936868590c1d007e3efcfae:GetName().."SearchFrame",BLGUI_1346009d8936868590c1d007e3efcfae,"BFSearchFrameTemplate") _G[self.frame:GetName().."EditBox"]:SetTextInsets(5, 2, 2, 2) _G[self.frame:GetName().."SearchBtn"]:EnableMouse(true) _G[self.frame:GetName().."EditBox"]:SetText(BLGUI_28d1ce9d934ec0135426813943dd429c or "") self.frame:SetHeight(BLGUI_ba70ac59c8a4b2cc67cf63223c84b656) self.frame:SetWidth(BLGUI_aacf928ffa23e474a000b1b6292d02a9) _G[self.frame:GetName().."SearchBtn"]:SetWidth(self.frame:GetHeight()-6) _G[self.frame:GetName().."SearchBtn"]:SetHeight(self.frame:GetHeight()-6) _G[self.frame:GetName().."EditBox"]:SetScript("OnEditFocusGained",function(edit) edit:HighlightText() if edit:GetText() ==BLGUI_28d1ce9d934ec0135426813943dd429c then edit:SetText("") edit:SetFontObject("ChatFontNormal") end end) _G[self.frame:GetName().."EditBox"]:SetMultiLine(false) _G[self.frame:GetName().."EditBox"]:SetScript("OnEditFocusLost",function(edit) edit:HighlightText(0,0) end) _G[self.frame:GetName().."EditBox"]:SetScript("OnEnterPressed",function() BLGUI_fdc18637a5aac28250b4e30d121867da(self) end) _G[self.frame:GetName().."SearchBtn"]:SetScript("OnClick",function() BLGUI_fdc18637a5aac28250b4e30d121867da(self) end) self.frame:Show() end BLGUI_665f77d44103340a4afde7c086158e86(BFSearch); --[[ 无调用 注释掉 BFPanel = {} local function CreatePatch(BLGUI_1346009d8936868590c1d007e3efcfae,BLGUI_8983c60d66c8593ec7165ea9dbedb584,texture,xstart,xend,ystart,yend,width,height) local patch = BLGUI_1346009d8936868590c1d007e3efcfae:CreateTexture(BLGUI_8983c60d66c8593ec7165ea9dbedb584,"BACKGROUND") patch:SetTexture(texture) patch:SetTexCoord(xstart,xend,ystart,yend) if width then patch:SetWidth(width) else patch:SetWidth(32) end if height then patch:SetHeight(height) else patch:SetHeight(32) end return patch end function BFPanel:Constructor(BLGUI_8983c60d66c8593ec7165ea9dbedb584,BLGUI_1346009d8936868590c1d007e3efcfae,BLGUI_9248008bbb6d0ee7ce13f6ee45680051,...) local panel = CreateFrame("Frame",BLGUI_8983c60d66c8593ec7165ea9dbedb584,BLGUI_1346009d8936868590c1d007e3efcfae) panel:SetWidth(100) panel:SetHeight(100) local patchsData = {...} local patchs = {} for _,_patchData in ipairs(patchsData) do local patch = CreatePatch(panel, BLGUI_8983c60d66c8593ec7165ea9dbedb584:GetName().._patchData.position, BLGUI_9248008bbb6d0ee7ce13f6ee45680051, _patchData.xstart, _patchData.xend, _patchData.ystart, _patchData.yend, _patchData.width, _patchData.height) patchs[_patchData.position:upper() ] = patch end if patchs.TOPLEFT then patchs.TOPLEFT:SetPoint("TOPLEFT",panel,"TOPLEFT") end if patchs.TOPRIGHT then patchs.TOPRIGHT:SetPoint("TOPRIGHT",panel,"TOPRIGHT") end if patchs.BOTTOMLEFT then patchs.BOTTOMLEFT:SetPoint("BOTTOMLEFT",panel,"BOTTOMLEFT") end if patchs.BOTTOMRIGHT then patchs.BOTTOMRIGHT:SetPoint("BOTTOMRIGHT",panel,"BOTTOMRIGHT") end if patchs.TOPCENTER then patchs.TOPCENTER:SetPoint("TOPLEFT",patchs.TOPLEFT,"TOPRIGHT") patchs.TOPCENTER:SetPoint("BOTTOMRIGHT",patchs.TOPRIGHT,"BOTTOMLEFT") end if patchs.MIDDLELEFT then patchs.MIDDLELEFT:SetPoint("TOPLEFT",patchs.TOPLEFT,"BOTTOMLEFT") patchs.MIDDLELEFT:SetPoint("BOTTOMRIGHT",patchs.BOTTOMLEFT,"TOPRIGHT") end if patchs.BOTTOMCENTER then patchs.BOTTOMCENTER:SetPoint("TOPLEFT",patchs.BOTTOMLEFT,"TOPRIGHT") patchs.BOTTOMCENTER:SetPoint("BOTTOMRIGHT",patchs.BOTTOMRIGHT,"BOTTOMLEFT") end if patchs.MIDDLERIGHT then patchs.MIDDLERIGHT:SetPoint("TOPLEFT",patchs.TOPRIGHT,"BOTTOMLEFT") patchs.MIDDLERIGHT:SetPoint("BOTTOMRIGHT",patchs.BOTTOMRIGHT,"TOPRIGHT") end if patchs.MIDDLECENTER then patchs.MIDDLECENTER:SetPoint("TOPLEFT",patchs.TOPLEFT,"BOTTOMRIGHT") patchs.MIDDLECENTER:SetPoint("BOTTOMRIGHT",patchs.BOTTOMRIGHT,"TOPLEFT") end return panel end ]] BLibrary:Register(BFProgressBar, "BFProgressBar"); BLibrary:Register(BFTreeCtrl, "BFTreeCtrl"); BLibrary:Register(BFTreeCtrlItem, "BFTreeCtrlItem"); BLibrary:Register(BFButton, "BFButton"); BLibrary:Register(BFLock, "BFLock"); BLibrary:Register(BFSearch, "BFSearch"); function BFButton_Test() BLGUI_d5f6c557ab9ad68ad4dc7be05b67bd18 = BLibrary("BFButton", UIParent, 96, 32); BLGUI_d5f6c557ab9ad68ad4dc7be05b67bd18:SetPoint("CENTER", "UIParent", "CENTER", 0, 0); BLGUI_d5f6c557ab9ad68ad4dc7be05b67bd18:SetText("abc"); end function BFTreeCtrl_Test() BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f = BLibrary("BFTreeCtrl", UIParent, 300, 200); local BLGUI_2a4819fa499a2212a312d7cffe6ea74c = { { text = "Item1", child = { { text = "abc", child = { { text = "def" } } }, } }, { text = "Item2", child = { { text = "Item3" }, { text = "Item4", child = { { text = "测试" }, } }, { text = "Item5" }, } }, { text = "Item6" }, }; BLGUI_b2a008d2379c9181f9d92ab119816960 = BLibrary("BFTreeCtrlItem"); BLGUI_b2a008d2379c9181f9d92ab119816960:SetText("Item 1"); BLGUI_98df383962c26ee3ba596c696b7756f3 = BLibrary("BFTreeCtrlItem"); BLGUI_98df383962c26ee3ba596c696b7756f3:SetText("Item 2"); BLGUI_3723ac9963b3d0baf6d51b616ca143b0 = BLibrary("BFTreeCtrlItem"); BLGUI_3723ac9963b3d0baf6d51b616ca143b0:SetText("Item 3"); --[[ BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_b2a008d2379c9181f9d92ab119816960); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_98df383962c26ee3ba596c696b7756f3, BLGUI_b2a008d2379c9181f9d92ab119816960, "child"); BLGUI_2e00ffac12aadb3a1fd865993ec505b9 = BLibrary("BFTreeCtrlItem"); BLGUI_2e00ffac12aadb3a1fd865993ec505b9:SetText("测试"); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_2e00ffac12aadb3a1fd865993ec505b9, BLGUI_98df383962c26ee3ba596c696b7756f3, "child"); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_3723ac9963b3d0baf6d51b616ca143b0, BLGUI_98df383962c26ee3ba596c696b7756f3); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_2a4819fa499a2212a312d7cffe6ea74c, BLGUI_3723ac9963b3d0baf6d51b616ca143b0, "child"); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:ExpandItem(BLGUI_b2a008d2379c9181f9d92ab119816960); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:CollapseItem(BLGUI_b2a008d2379c9181f9d92ab119816960); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:ExpandItem(BLGUI_b2a008d2379c9181f9d92ab119816960); ]] BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:InsertItem(BLGUI_2a4819fa499a2212a312d7cffe6ea74c); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:SetPoint("CENTER", UIParent, "CENTER", 0, 0); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:SetBorder(true); BLGUI_1b03e3be3c85c3240ea19a93e3f82e9f:Show(); end function BFSearch_Test() local search = BLibrary("BFSearch", UIParent, 150, 32,"search"); search:SetPoint("CENTER") search.validation = function(text) return true end search.onFailed = function(text) print(text .." is failed") end search.callback = function(text) print(text) end end 
